We're going to use `g_object_run_dispose()` on StThemeNode with the next
commit in order to manually clear the properties array and a few other
things when the StThemeContext changes.
That's because after theme context changes, the CSS properties will no
longer be valid, and accessing them will cause crashes. Even if St behaves
nicely and throws out all theme nodes on theme context changes, there
might still be users holding references to nodes, so we want to ensure that
the old nodes are harmless after theme context changes.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3809>
(cherry picked from commit
07d6cf017eedfa02059848b33a5412576ac023c6)
st_theme_node_paint_state_free (&node->cached_state);
+ maybe_free_properties (node);
g_clear_object (&node->theme);
G_OBJECT_CLASS (st_theme_node_parent_class)->dispose (gobject);
g_strfreev (node->pseudo_classes);
g_free (node->inline_style);
- maybe_free_properties (node);
-
g_clear_pointer (&node->font_desc, pango_font_description_free);
g_clear_pointer (&node->box_shadow, st_shadow_unref);